﻿<script type="text/javascript">
    $(function() {

    $("#chuku_yuejie_riqi").combobox({
        onLoadSuccess: function() {
            var m = new Date().getMonth() + 1;
            $("#chuku_yuejie_riqi").combobox('setValue', m);
        }
    });

    $("#chuku_chaxun_yuejie").click(function() {
        //查询
        var yueFen = $("#chuku_yuejie_riqi").datebox('getValue');
        var zhandianStr = $("#chuku_zhandian_yuejie").combobox('getValue');
        $("#chuku_yuejie").datagrid("load", { zhandian: zhandianStr, chengzhongleixing: '出库物料', yuefen: yueFen, uid: window.uid, kid: window.kid });
    });
    $("#chuku_daochu_yuejie").click(function() {
        //导出
        var yueFen = $("#chuku_yuejie_riqi").datebox('getValue');
        var zhandianStr = $("#chuku_zhandian_yuejie").combobox('getValue').replace("#", "_");
        var yongHu = $("#currentUser").text();
        window.open(encodeURI("http://keaomds.com:10001/?uid=" + window.uid + "&kid=" + window.kid + "&requestType=6&keHuBianHao=" + window.kehubianhao + "&yuejie=" + window.yuejie + "&zhandian=" + zhandianStr + "&chengzhongleixing=出库物料&yuefen=" + yueFen + "&yonghu=" + yongHu));
    });
$("#chuku_zhandian_yuejie").combobox({
    url: 'json/zhandian.json',
    method: 'get',
    valueField: 'zhandian',
    textField: 'zhandian',
    panelWidth: 175,
    panelHeight: 'auto',
    editable: false,
    onLoadSuccess: function() {
        $("#chuku_yuejie").datagrid({ url: "handler/yuejie.ashx", method: "get", queryParams: { zhandian: $("#chuku_zhandian_yuejie").combobox('getValue'), chengzhongleixing: '出库物料', yuefen: $("#chuku_yuejie_riqi").combobox('getValue'), uid: window.uid, kid: window.kid }, height: document.body.scrollHeight - 180 });
    }
});

 
    });
</script>

<div class="easyui-panel" data-options="height:90,border:false" title="数据检索" style="border-top-width: 0px;
    border-bottom-width: 1px; padding: 15px">
    <table style="font-size: 12px;">
        <tr>
           <td>
                站点：
            </td>
            <td>
                <input name="chuku_zhandian_yuejie" id="chuku_zhandian_yuejie" style="width: 175px;" />
            </td>
            <td>
                月份：
            </td>
            <td>
            <input id="chuku_yuejie_riqi" type="text" class="" data-options="required:true,valueField:'id',textField:'text',data:[{'id':1,'text':'1月'},{'id':2,'text':'2月'},{'id':3,'text':'3月'},{'id':4,'text':'4月'},{'id':5,'text':'5月'},{'id':6,'text':'6月'},{'id':7,'text':'7月'},{'id':8,'text':'8月'},{'id':9,'text':'9月'},{'id':10,'text':'10月'},{'id':11,'text':'11月'},{'id':12,'text':'12月'}]"
                    style="width:70px">
            </td>
            <td>
                <a id="chuku_chaxun_yuejie" class="easyui-linkbutton" data-options="iconCls:'icon-search'"
                    style="width: 60px; margin-left: 20px;">查询</a>
            </td>
            <td>
                <a id="chuku_daochu_yuejie" class="easyui-linkbutton" data-options="iconCls:'icon-export-16'"
                    style="width: 60px">导出</a>
            </td>
        </tr>
    </table>
</div>
<table id="chuku_yuejie" class="easyui-datagrid" title="出库物资月结信息" data-options="border:false,singleSelect:true,collapsible:false,striped:true">
    <thead>
        <tr>
            <th data-options="field:'wuliaomingcheng',width:110">
                物料名称
            </th>
            <th data-options="field:'xinghao',width:100">
                型号
            </th>
            <th data-options="field:'maozhong',width:100,align:'right'">
                毛重(吨)
            </th>
            <th data-options="field:'pizhong',width:100,align:'right'">
                皮重(吨)
            </th>
            <th data-options="field:'kouzhong',width:100,align:'right'">
                扣重(吨)
            </th>
            <th data-options="field:'jingzhong',width:100,align:'right'">
                净重(吨)
            </th>
            <th data-options="field:'cheshu',width:100,align:'right'">
                车数(车)
            </th>
            <th data-options="field:'fahuozhongliang',width:100,align:'right'">
                发货(吨)
            </th>
            <th data-options="field:'jisuanfangliang',width:100,align:'right'">
                方量(方)
            </th>
        </tr>
    </thead>
</table>
